import { NavBar, Icon } from 'antd-mobile';
import React, { Component } from "react";
import {BrowserRouter as Router,Route,Link}from 'react-router-dom';

export default class Header extends Component{
	constructor(props){
	   super(props);
	  
	}

	goBack(){
		console.log(this.props)
	    // this.props.history.goBack();
	}
	render(){
	 let {title} = this.props;
	 return (<div>
	    <NavBar
	      mode="light"
	      icon={<Icon type="left" />}
	      onLeftClick={()=>this.goBack()}
	      rightContent={[
	        <Icon key="0" type="search" style={{ marginRight: '16px' }} />,
	        <Icon key="1" type="ellipsis" />,
	      ]}
	    >{title||''}</NavBar>
	  </div>
	 )
   }
}